package com.ruoyi.wechat.service.impl;

import java.util.List;

import com.ruoyi.common.utils.uuid.IdUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.wechat.mapper.CActivityMapper;
import com.ruoyi.wechat.domain.CActivity;
import com.ruoyi.wechat.service.ICActivityService;

/**
 * 营地活动列表Service业务层处理
 * 
 * @author ruoyi
 * @date 2024-12-05
 */
@Service
public class CActivityServiceImpl implements ICActivityService 
{
    @Autowired
    private CActivityMapper cActivityMapper;

    /**
     * 查询营地活动列表
     * 
     * @param activityId 营地活动列表主键
     * @return 营地活动列表
     */
    @Override
    public CActivity selectCActivityByActivityId(String activityId)
    {
        return cActivityMapper.selectCActivityByActivityId(activityId);
    }

    @Override
    public List<CActivity> getInfoByCampId(String campId) {
            CActivity activity = new CActivity();
            activity.setCampId(campId);
            return cActivityMapper.selectCActivityList(activity);
    }

    /**
     * 查询营地活动列表列表
     * 
     * @param cActivity 营地活动列表
     * @return 营地活动列表
     */
    @Override
    public List<CActivity> selectCActivityList(CActivity cActivity)
    {
        return cActivityMapper.selectCActivityList(cActivity);
    }

    /**
     * 新增营地活动列表
     * 
     * @param cActivity 营地活动列表
     * @return 结果
     */
    @Override
    public int insertCActivity(CActivity cActivity)
    {
        cActivity.setActivityId(IdUtils.randomUUID());
        return cActivityMapper.insertCActivity(cActivity);
    }

    /**
     * 修改营地活动列表
     * 
     * @param cActivity 营地活动列表
     * @return 结果
     */
    @Override
    public int updateCActivity(CActivity cActivity)
    {
        return cActivityMapper.updateCActivity(cActivity);
    }

    /**
     * 批量删除营地活动列表
     * 
     * @param activityIds 需要删除的营地活动列表主键
     * @return 结果
     */
    @Override
    public int deleteCActivityByActivityIds(String[] activityIds)
    {
        return cActivityMapper.deleteCActivityByActivityIds(activityIds);
    }

    /**
     * 删除营地活动列表信息
     * 
     * @param activityId 营地活动列表主键
     * @return 结果
     */
    @Override
    public int deleteCActivityByActivityId(String activityId)
    {
        return cActivityMapper.deleteCActivityByActivityId(activityId);
    }
}
